#pragma once
#include "Singleton.h"
#include <hash_map>
class Mesh;

class MeshManager : public Singleton<MeshManager>
{
	typedef stdext::hash_map<std::string, Mesh*> MeshMap;
public:
	MeshManager();
	~MeshManager();

	Mesh* Create(const std::string& name);
	Mesh* Load(const std::string& name);
	Mesh* GetByName(const std::string& name);
	bool RemoveByName(const std::string& name);
	void RemoveAll();

	void BuildShapeMeshes();

private:
	MeshMap mMeshs;
};
